<?php include 'application/views/header.php' ?>
<?php include 'application/views/left.php' ?>

<!-- BOX NEWS -->
<div class="content-box user-registry">
    <div class="title">
        <div class="label">Đăng ký</div>
        <div class="end-title"></div>
    </div>
    <!-- content -->
    <div class="user-registry-content clr">
       <form id="frmRegistry" method="post" action="<?php echo site_url() ?>/user/registry">
            <div class="row">
                <div class="label">Tài khoản</div>
                <div class="value"><input type="text" value="<?php echo (isset($UserName) ? $UserName : '') ?>" id="UserName" name="UserName"/></div>
                <label class="error"><?php echo $this->session->flashdata('message_username') ?></label>
            </div>
            <div class="row">
                <div class="label">Mật khẩu</div>
                <div class="value"><input type="password" value="" id="Password" name="Password"/></div>
            </div>
            <div class="row">
                <div class="label">Tên của bạn</div>
                <div class="value"><input type="text" value="<?php echo (isset($FullName) ? $FullName : '') ?>" id="FullName" name="FullName"/></div>
            </div>
            <div class="row">
                <div class="label">Điện thoại</div>
                <div class="value"><input type="text" value="<?php echo (isset($Phone) ? $Phone : '') ?>" id="Phone" name="Phone"/></div>
            </div>
            <div class="row">
                <div class="label">Địa chỉ</div>
                <div class="value"><input type="text" value="<?php echo (isset($Address) ? $Address : '') ?>" id="Address" name="Address"/></div>
            </div>
            <div class="row">
                <div class="label">Email</div>
                <div class="value"><input type="text" value="<?php echo (isset($Email) ? $Email : '') ?>" id="Email" name="Email"/></div>
                <label class="error"><?php echo $this->session->flashdata('message_email') ?></label>
            </div>
            <div class="row button-set">
                <input type="submit" value="Đăng ký" />
                <input type="reset" value="Hủy bỏ" />
            </div>
       </form>
    </div>
</div>

<?php include 'application/views/right.php' ?>
<?php include 'application/views/footer.php' ?>

<script type="text/javascript">
$('#frmRegistry').validate({
   rules: {
        UserName : 'required',
        Password : 'required',
        FullName : 'required',
        Phone : {
            required : true,
            number: true
        },
        Address : 'required',
        Email : {
            required: true,
            email: true
        }
   },
   messages: {
        UserName : '',
        Password : '',
        FullName : '',
        Phone : '',
        Address : '',
        Email : ''
   } 
});
</script>